<template>
  <div>
    <h1>App</h1>
    count: <button @click="updateCount">{{ count }}</button>
    <BsButton></BsButton>
  </div>
</template>
<script setup>
import { provide, readonly, ref } from 'vue';

import BsButton from './components/BsButton.vue';
const count = ref(0);

const updateCount = function () {
  count.value++;
}
// 提供数据
provide('count', {
  count: readonly(count),
  updateCount,
});

</script>


<style>
div {
  border: solid;
  padding: 20px
}
</style>